//
//  BaseViewController.h
//  HOrangiOS
//
//  Created by YOrange on 2018/4/24.
//  Copyright © 2018年 YOrange. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "MBProgressHUD.h"

@interface BaseViewController : UIViewController

@property(nonatomic,strong)MBProgressHUD * mbProgress;

/*****************关于导航栏上**************************/

///定义导航栏右边的按钮（文字）
-(void)initRightButtonItem:(NSString*)btnContent withEdgeInset:(UIEdgeInsets)edgeInsets;

///定义导航栏右边的按钮（图片）
-(void)initRightButtonImgItem:(UIImage*)img withEdgeInsets:(UIEdgeInsets)edgeInsets;

///隐藏左边的按钮
-(void)initLeftButtonItem;

/****************MBProgressHUD*******************/
///loading
-(void)mbShowLoadingText;

///loading带文字的
-(void)mbShowLoadingText:(NSString*)loadingText;


///消失1s后消失
-(void)mbShowToast:(NSString*)str;

///loading消失
-(void)mbDismiss;

///错误弹框
-(void)mbShowError:(NSError*)error;


/*********************返回************************************/
///返回几级
-(void)back:(int)indexVc;

@end
